/**
 * Class representing a simple Haskell-style tuple (a,b)
 *
 * @param <A> Type of first tuple element
 * @param <B> Type of second tuple element
 */
public class Tuple<A,B> {
	private A a;
	private B b;
	
	/**
	 * Constructs a Tuple given two elements
	 */
	public Tuple(A a, B b) {
		this.a = a;
		this.b = b;
	}
	
	/**
	 * Returns the tuple's first element 
	 */
	public A a() {
		return a;
	}
	
	/**
	 * Returns the tuple's second element 
	 */
	public B b() {
		return b;
	}
	
	public String toString() {
		return "(" + a + ", " + b + ")";
	}

	public void setA(A a) {
		this.a = a;
	}

	public void setB(B b) {
		this.b = b;
	}
}
